NOTE: PROCEDURE PRINTTO used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

4    
5    * this program used to create the main dependent variable ;
6    
7    %global projectrootdirectory;
8    %let projectrootdirectory = C:/Users/hpham13/Projects/mf_activism/empirical;
9    
10   /* Create local libraries */
11   libname rawdata "&projectrootdirectory./0_input/original";
NOTE: Libref RAWDATA was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Projects\mf_activism\empirical\0_input\original
12   libname save    "&projectrootdirectory./1_code/final_package_acceptance";
NOTE: Libref SAVE was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: 
      C:\Users\hpham13\Projects\mf_activism\empirical\1_code\final_package_acceptance
13   libname data    "C:/Users/hpham13/Projects/mutualfund/empirical/0_inputs/mfdb/Data/Original"
13 ! ;
NOTE: Libref DATA was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Projects\mutualfund\empirical\0_inputs\mfdb\Data\Original
14   
15   %global datadirectory;
16   %let datadirectory = C:/Users/hpham13/Data;
17   
18   libname lnk      "&datadirectory./Linking_tables/";
NOTE: Libref LNK was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Data\Linking_tables
19   libname ceo      "&datadirectory./ceo/";
NOTE: Libref CEO was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Data\ceo
20   libname activism "&datadirectory./activism/";
NOTE: Libref ACTIVISM was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Data\activism
21   libname comp     "&datadirectory./compustat/fundq/";
NOTE: Libref COMP was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Data\compustat\fundq
22   libname crsp     "&datadirectory./crsp/";
NOTE: Libref CRSP was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Data\crsp
23   libname tr       "&datadirectory./ThomsonReuters/s12";
NOTE: Libref TR was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Data\ThomsonReuters\s12
24   libname lnk      "&datadirectory./Linking_tables";
NOTE: Libref LNK was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Data\Linking_tables
25   libname mfl      "&datadirectory./Linking_tables/mflink2_20230828";
NOTE: Libref MFL was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: C:\Users\hpham13\Data\Linking_tables\mflink2_20230828
26   
27   /* Macros */
28   %include "&datadirectory./utils/do_over.sas";
335  %include "&datadirectory./utils/ff48.sas";
407  %include "&datadirectory./utils/ff49.sas";
480  %include "&datadirectory./utils/ff12.sas";
519  %include "&datadirectory./utils/winsorize.sas";
607   %include "&datadirectory./utils/lags.sas";
786   
787   
788   /* ******************************************************************************** */
789   /* PART 1:  Compute MF holdings "Adjusted Shares Held" from S12 and CRSP     ****** */
790   /* ******************************************************************************** */
791   %let begdate = 01MAR1995;
792   %let enddate = 31DEC2021;
793   
794   /* Get CRSP Prices, Returns, and Adjustment Factors from MSF Dataset */
795   data Price;
796       format QDATE date9.;
797       set crsp.msf (keep = permno date cfacpr cfacshr shrout prc ret);
NOTE: Data file CRSP.MSF.DATA is in a format that is native to another host, or the file 
      encoding does not match the session encoding. Cross Environment Data Access will be used, 
      which might require additional CPU resources and might reduce performance.
798       by permno date;
799       where date between "&begdate"d and "&enddate"d;
800       QDATE = intnx('QTR',   date, 0, 'E');
801       DATE  = intnx('MONTH', date, 0, 'E');
802       TSO   = shrout * cfacshr * 1000;
803       P     = abs(prc) / cfacpr;
804       P_1   = lag(P);
805       if first.permno then P_1 = .;
806       ME    = P * TSO / 1000000;
807       label TSO = "Total Shares Outstanding, Adjusted";
808       label P   = "Price at t Period End, Adjusted";
809       label P_1 = "Price at (t-1), Adjusted";
810       label ME  = "Market Capitalization, x$1m";
811       if TSO > 0;
812       format TSO comma12.0 ret percentn8.2 prc: dollar12.3;
813       drop prc cfacpr shrout;
814   run;

NOTE: Division by zero detected at line 803 column 22.
QDATE=31DEC2011 PERMNO=13030 DATE=20111031 PRC=$17.330 RET=C SHROUT=200 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=164928
NOTE: Division by zero detected at line 803 column 22.
QDATE=31DEC2011 PERMNO=13030 DATE=20111130 PRC=$17.360 RET=0.17% SHROUT=300 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=164929
NOTE: Division by zero detected at line 803 column 22.
QDATE=31DEC2011 PERMNO=13030 DATE=20111231 PRC=$12.160 RET=-29.95% SHROUT=800 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=164930
NOTE: Division by zero detected at line 803 column 22.
QDATE=31MAR2012 PERMNO=13030 DATE=20120131 PRC=$6.830 RET=-43.83% SHROUT=2500 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=164931
NOTE: Division by zero detected at line 803 column 22.
QDATE=31MAR2012 PERMNO=13030 DATE=20120229 PRC=$5.490 RET=-19.62% SHROUT=19098 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=164932
NOTE: Division by zero detected at line 803 column 22.
QDATE=30SEP2004 PERMNO=90298 DATE=20040731 PRC=$11.450 RET=C SHROUT=18279 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059434
NOTE: Division by zero detected at line 803 column 22.
QDATE=30SEP2004 PERMNO=90298 DATE=20040831 PRC=$11.720 RET=2.36% SHROUT=18279 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059435
NOTE: Division by zero detected at line 803 column 22.
QDATE=30SEP2004 PERMNO=90298 DATE=20040930 PRC=$15.990 RET=36.43% SHROUT=18279 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059436
NOTE: Division by zero detected at line 803 column 22.
QDATE=31DEC2004 PERMNO=90298 DATE=20041031 PRC=$17.100 RET=6.94% SHROUT=18279 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059437
NOTE: Division by zero detected at line 803 column 22.
QDATE=31DEC2004 PERMNO=90298 DATE=20041130 PRC=$22.550 RET=31.87% SHROUT=27831 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059438
NOTE: Division by zero detected at line 803 column 22.
QDATE=31DEC2004 PERMNO=90298 DATE=20041231 PRC=$16.250 RET=-27.01% SHROUT=27831 CFACPR=0
CFACSHR=0 FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1
_N_=2059439
NOTE: Division by zero detected at line 803 column 22.
QDATE=31MAR2005 PERMNO=90298 DATE=20050131 PRC=$16.890 RET=3.94% SHROUT=27831 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059440
NOTE: Division by zero detected at line 803 column 22.
QDATE=31MAR2005 PERMNO=90298 DATE=20050228 PRC=$21.670 RET=28.30% SHROUT=27831 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059441
NOTE: Division by zero detected at line 803 column 22.
QDATE=31MAR2005 PERMNO=90298 DATE=20050331 PRC=$18.550 RET=-13.43% SHROUT=27831 CFACPR=0
CFACSHR=0 FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1
_N_=2059442
NOTE: Division by zero detected at line 803 column 22.
QDATE=30JUN2005 PERMNO=90298 DATE=20050430 PRC=$15.600 RET=-15.90% SHROUT=27831 CFACPR=0
CFACSHR=0 FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1
_N_=2059443
NOTE: Division by zero detected at line 803 column 22.
QDATE=30JUN2005 PERMNO=90298 DATE=20050531 PRC=$15.940 RET=2.18% SHROUT=27831 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059444
NOTE: Division by zero detected at line 803 column 22.
QDATE=30JUN2005 PERMNO=90298 DATE=20050630 PRC=$15.870 RET=-0.44% SHROUT=27831 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059445
NOTE: Division by zero detected at line 803 column 22.
QDATE=30SEP2005 PERMNO=90298 DATE=20050731 PRC=$15.370 RET=-0.25% SHROUT=27831 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=0 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059446
NOTE: Division by zero detected at line 803 column 22.
QDATE=30SEP2005 PERMNO=90298 DATE=20050731 PRC=$15.370 RET=-0.25% SHROUT=27831 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=0 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059447
NOTE: Division by zero detected at line 803 column 22.
WARNING: Limit set by ERRORS= option reached.  Further errors of this type will not be printed.
QDATE=30SEP2005 PERMNO=90298 DATE=20050831 PRC=$15.410 RET=0.26% SHROUT=27831 CFACPR=0 CFACSHR=0
FIRST.PERMNO=0 LAST.PERMNO=0 FIRST.DATE=1 LAST.DATE=1 TSO=0 P=. P_1=. ME=. _ERROR_=1 _N_=2059448
NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      16861 at 802:20   64195 at 803:13   64195 at 803:22   64851 at 806:15   
NOTE: Mathematical operations could not be performed at the following places. The results of the 
      operations have been set to missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      656 at 803:22   
NOTE: There were 2373587 observations read from the data set CRSP.MSF.
      WHERE (date>='01MAR1995'D and date<='31DEC2021'D);
NOTE: The data set WORK.PRICE has 2340645 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           3.06 seconds
      cpu time            3.07 seconds
      

815   
816   /* Keep Last Monthly Observation for Each Quarter */
817   data Price;
818       set Price;
819       by permno qdate date;
820       if last.qdate;
821   run;

NOTE: There were 2340645 observations read from the data set WORK.PRICE.
NOTE: The data set WORK.PRICE has 788968 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           0.15 seconds
      cpu time            0.14 seconds
      

822   
823   /* Get report and vintage dates from Thomson-Reuters Mutual Fund Holdings */
824   /* Exclude Non-Equity Funds from Holdings data that is reported as of Fiscal Quarter End */
825   /* First, Keep First Vintage with Holdings Data for Each RDATE-FUNDNO */
826   proc sql;
827       create table First_Vint as
828       select distinct
829              intnx("month", rdate, 0, "E") as rdate format date9.,
830              fdate,
831              fundno
832       from tr.s12type1
833       where "&begdate"d <= rdate <= "&enddate"d
834         and ioc not in (1, 5, 6, 7)
835       group by fundno,
836                intnx("month", rdate, 0, "E")
837       having fdate = min(fdate)
838          and max(rdate) = rdate
839       order by fundno,
840                rdate desc;
NOTE: The query requires remerging summary statistics back with the original data.
NOTE: Table WORK.FIRST_VINT created, with 1552309 rows and 3 columns.

841   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           1.28 seconds
      cpu time            1.78 seconds
      

842   
843   /* Until 2003, funds were only required to disclose their holdings semi-annually */
844   /* Approximately 60% of funds additionally report quarterly holdings */
845   /* Use 6-Months as cut-off for portfolio holding period if the gap btw rdates is large */
846   data First_Vint;
847       set First_Vint;
848       by fundno descending rdate;
849       format nrdate date9.;
850   
851       nrdate = lag(rdate);
852       if first.fundno then nrdate = intnx("month", rdate, 6, "E");
853       nrdate = min(nrdate, intnx("month", rdate, 6, "E"));
854   run;

NOTE: There were 1552309 observations read from the data set WORK.FIRST_VINT.
NOTE: The data set WORK.FIRST_VINT has 1552309 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.26 seconds
      cpu time            0.26 seconds
      

855   
856   proc sort data = First_Vint nodupkey;
857       by fundno fdate;
858   run;

NOTE: There were 1552309 observations read from the data set WORK.FIRST_VINT.
NOTE: 14 observations with duplicate key values were deleted.
NOTE: The data set WORK.FIRST_VINT has 1552295 observations and 4 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.09 seconds
      cpu time            0.25 seconds
      

859   
860   /* Add WFICN portfolio identifiers from MFLINKS */
861   proc sql;
862       create table First_Vint as
863       select b.wficn,
864              a.*
865       from First_Vint as a,
866            mfl.mflink2 as b
867       where a.fundno = b.fundno
868         and a.fdate  = b.fdate
869         and not missing(b.wficn);
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.FIRST_VINT created, with 419694 rows and 5 columns.

870   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.56 seconds
      cpu time            0.59 seconds
      

871   
872   proc sort data = First_Vint nodupkey;
873       by wficn rdate;
874   run;

NOTE: There were 419694 observations read from the data set WORK.FIRST_VINT.
NOTE: 122 observations with duplicate key values were deleted.
NOTE: The data set WORK.FIRST_VINT has 419572 observations and 5 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.04 seconds
      cpu time            0.11 seconds
      

875   
876   /* Add Total Number of S12 Filers During Each Quarter (NumInst) */
877   proc sql undo_policy = none;
878       create table First_Vint as
879       select distinct *,
880              count(fundno) as NumInst
881       from First_Vint
882       group by rdate
883       order by fdate,
884                fundno;
NOTE: The query requires remerging summary statistics back with the original data.
NOTE: Table WORK.FIRST_VINT created, with 419572 rows and 6 columns.

885   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.14 seconds
      cpu time            0.21 seconds
      

886   
887   /* Extract Holdings data by Merging TR-MF S12type1 and S12type3 Sets */
888   proc sql;
889       create view Holdings
890       as select a.rdate,a.nrdate,a.fdate,a.wficn,a.fundno,a.NumInst,b.cusip,b.shares
891       from First_Vint as a, tr.s12type3 as b
892       where a.fdate=b.fdate and a.fundno=b.fundno;
NOTE: SQL view WORK.HOLDINGS has been defined.
893   
894       create view Holdings1
895       as select a.rdate,a.nrdate,a.fdate,a.wficn,a.fundno,a.NumInst,b.permno,a.shares
896       from Holdings as a, (select distinct ncusip, permno from data.msenames
897                      where not missing(ncusip)) as b
898       where a.cusip=b.ncusip;
NOTE: SQL view WORK.HOLDINGS1 has been defined.
899   
900       create table Holdings2
901       as select b.date, a.rdate,a.nrdate,a.wficn,a.fundno,a.permno,a.NumInst,
902           a.shares*b.cfacshr as shares_adj label = "Adjusted Shares Held"
903       from Holdings1 as a, price as b
904       where a.permno=b.permno and a.fdate=b.qdate;
NOTE: Table WORK.HOLDINGS2 created, with 43478321 rows and 8 columns.

905   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           34.50 seconds
      cpu time            34.25 seconds
      

906   
907   /* Sanity Checks for Duplicates */
908   proc sort data = Holdings2
909             out  = MF_Holdings
910             nodupkey;
911       by wficn rdate permno;
912   run;

NOTE: There were 43478321 observations read from the data set WORK.HOLDINGS2.
NOTE: 23 observations with duplicate key values were deleted.
NOTE: The data set WORK.MF_HOLDINGS has 43478298 observations and 8 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           5.12 seconds
      cpu time            14.01 seconds
      

913   
914   
915   /* ******************************************************************************** */
916   /* Part 2:   Make a List of Domestic all-equity funds using CRSP MFDB   *********** */
917   /* ******************************************************************************** */
918   /* Extract CRSP Mutual Funds Performance and Characteristics */
919   /* Merge fraction of portfolio in equity assets with the objective code data */
920   proc sql;
921       create table Fund_Style as
922       select a.crsp_fundno,
923              a.si_obj_cd,
924              a.wbrger_obj_cd,
925              a.lipper_obj_cd,
926              a.lipper_obj_name,
927              a.lipper_asset_cd,
928              a.policy,
929              a.lipper_class,
930              a.crsp_obj_cd,
931              b.avrcs
932       from crsp.fund_style a
933       left join
934            (
935                select distinct crsp_fundno,
936                                sum(per_com) / count(per_com) as avrcs
937                from data.fund_summary2
938                group by crsp_fundno
939            ) b
940         on a.crsp_fundno = b.crsp_fundno;
NOTE: Table WORK.FUND_STYLE created, with 186445 rows and 10 columns.

941   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.62 seconds
      cpu time            0.76 seconds
      

942   
943   /* Sample Selection, focus on Domestic Equity Mutual Funds */
944   /* for which the holdings data are the most complete and reliable */
945   data Equity_Funds;
946       set Fund_Style;
947   
948       if not missing(Lipper_Class)
949          and lipper_class not in
950              ('EIEI','G','LCCE','LCGE','LCVE','MCCE',
951               'MCGE','MCVE','MLCE','MLGE','MLVE','SCCE','SCGE','SCVE')
952       then delete;
953       else if missing(Lipper_Class) then do;
954           if not missing(si_obj_cd)
955              and si_obj_cd not in ('AGG','GMC','GRI','GRO','ING','SCG')
956           then delete;
957           else if missing(si_obj_cd) then do;
958               if not missing(wbrger_obj_cd)
959                  and wbrger_obj_cd not in
959 ! ('G','G-I','AGG','GCI','GRI','GRO','LTG','MCG','SCG')
960               then delete;
961               else if missing(wbrger_obj_cd) then do;
962                   if not missing(policy) and policy ne 'CS' then delete;
963                   else if not missing(policy) and avrcs < 80 then delete;
964               end;
965           end;
966       end;
967   
968       keep crsp_fundno lipper_obj_cd lipper_obj_name crsp_obj_cd;
969   run;

NOTE: There were 186445 observations read from the data set WORK.FUND_STYLE.
NOTE: The data set WORK.EQUITY_FUNDS has 72495 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.03 seconds
      

970   
971   data names;
972       set crsp.fund_names (where = (fund_name ne ''));
973       by crsp_fundno;
974       if last.crsp_fundno;
975       keep crsp_fundno fund_name index_fund_flag;
976   run;

NOTE: There were 599342 observations read from the data set CRSP.FUND_NAMES.
      WHERE fund_name not = ' ';
NOTE: The data set WORK.NAMES has 71033 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.16 seconds
      cpu time            0.15 seconds
      

977   
978   /* identify index and target date funds and drop them from the sample */
979   data funds3;
980       merge Equity_Funds (in = in1)
981             names;
982       by crsp_fundno;
983       if in1;
984   run;

NOTE: There were 72495 observations read from the data set WORK.EQUITY_FUNDS.
NOTE: There were 71033 observations read from the data set WORK.NAMES.
NOTE: The data set WORK.FUNDS3 has 72495 observations and 6 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

985   
986   proc sql;
987       create table funds4 (drop = index_fund_flag) as
988       select *
989       from funds3
990       group by crsp_fundno
991       having count(index_fund_flag) = 0;
NOTE: The query requires remerging summary statistics back with the original data.
NOTE: Table WORK.FUNDS4 created, with 68402 rows and 5 columns.

992   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.05 seconds
      cpu time            0.04 seconds
      

993   
994   data funds4;
995       set funds4;
996       format namex $140.;
997       namex = lowcase(fund_name);
998   
999       if max(index(namex, 'index'), index(namex, 's&p')) = 0;
1000      if max(index(namex, 'idx'), index(namex, 'dfa'), index(namex, 'program')) = 0;
1001      if max(indexw(namex, 'etf'),
1002             index(namex, 'exchange traded'),
1003             index(namex, 'exchange-traded')) = 0;
1004      if max(index(namex, 'target'),
1005             index(namex, '2005'),
1006             index(namex, '2005'),
1007             index(namex, '2010'),
1008             index(namex, '2015'),
1009             index(namex, '2020'),
1010             index(namex, '2025'),
1011             index(namex, '2030'),
1012             index(namex, '2035'),
1013             index(namex, '2040'),
1014             index(namex, '2045'),
1015             index(namex, '2050'),
1016             index(namex, '2055')) = 0;
1017  
1018      drop namex fund_name;
1019  run;

NOTE: There were 68402 observations read from the data set WORK.FUNDS4.
NOTE: The data set WORK.FUNDS4 has 67225 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      cpu time            0.07 seconds
      

1020  
1021  * label missing obj code as other equity;
1022  data funds4;
1023      set funds4;
1024      if missing(lipper_obj_cd) then lipper_obj_cd = "OEQ";
1025      if lipper_obj_cd = "OEQ" then lipper_obj_name = "Other Equity Funds";
1026  run;

NOTE: There were 67225 observations read from the data set WORK.FUNDS4.
NOTE: The data set WORK.FUNDS4 has 67225 observations and 4 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

1027  
1028  * Select only Equity Domestic;
1029  data funds4;
1030      set funds4;
1031      crsp_obj_cd_2 = substr(crsp_obj_cd, 1, 2);
1032      new_var       = tranwrd(lipper_obj_name, "&", "AND");
1033      new_varx      = upcase(new_var);
1034      drop lipper_obj_name new_var;
1035      rename new_varx = lipper_obj_name;
1036  run;

NOTE: There were 67225 observations read from the data set WORK.FUNDS4.
NOTE: The data set WORK.FUNDS4 has 67225 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

1037  data funds5;
1038      set funds4;
1039      if crsp_obj_cd_2 = "ED";
1040  run;

NOTE: There were 67225 observations read from the data set WORK.FUNDS4.
NOTE: The data set WORK.FUNDS5 has 57904 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

1041  
1042  proc sql;
1043      create table MF_Port (where = (wficn ne .)) as
1044      select distinct b.wficn, a.crsp_fundno
1045      from funds5 as a
1046      left join mfl.mflink1 as b
1047        on a.crsp_fundno = b.crsp_fundno
1048      group by b.wficn
1049      order by wficn,
1050               crsp_fundno;
NOTE: A GROUP BY clause has been discarded because neither the SELECT clause nor the optional 
      HAVING clause of the associated table-expression referenced a summary function.
NOTE: Table WORK.MF_PORT created, with 17292 rows and 2 columns.

1051  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.05 seconds
      cpu time            0.04 seconds
      

1052  
1053  proc sort data = MF_Port;
1054      by wficn;
1055  run;

NOTE: Input data set is already sorted, no sorting done.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

1056  
1057  
1058  /* ******************************************************************************** */
1059  /* Part 3:   Merge the List of Domestic all-equity funds and Holdings   *********** */
1060  /* ******************************************************************************** */
1061  /* Merge Mutual Fund Holdings data and All-Equity Funds list */
1062  proc sort data = MF_Port;
1063      by wficn crsp_fundno;
1064  run;

NOTE: Input data set is already sorted, no sorting done.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

1065  
1066  data MF_merged;
1067      merge MF_Holdings (in = a)
1068            MF_Port     (in = b);
1069      by wficn;
1070      if b;
1071  run;

NOTE: MERGE statement has more than one data set with repeats of BY values.
NOTE: There were 43478298 observations read from the data set WORK.MF_HOLDINGS.
NOTE: There were 17292 observations read from the data set WORK.MF_PORT.
NOTE: The data set WORK.MF_MERGED has 19605571 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           2.50 seconds
      cpu time            2.50 seconds
      

1072  
1073  %let md_rdate = (year(rdate) * 12 + month(rdate) - 1925 * 12 - 11);
1074  %let qd_rdate = (year(rdate) * 4  + qtr(rdate)   - 1925 * 4);
1075  
1076  data MF_merged;
1077      set MF_merged;
1078      md = &md_rdate;
1079      qd = &qd_rdate;
1080  run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      1226 at 1:3    1226 at 1:15   1226 at 1:3    1226 at 1:15   
NOTE: There were 19605571 observations read from the data set WORK.MF_MERGED.
NOTE: The data set WORK.MF_MERGED has 19605571 observations and 11 variables.
NOTE: DATA statement used (Total process time):
      real time           2.47 seconds
      cpu time            2.43 seconds
      

1081  
1082  proc sort data = MF_merged
1083            out  = MF_merged
1084            nodupkey;
1085      by wficn rdate permno;
1086  run;

NOTE: There were 19605571 observations read from the data set WORK.MF_MERGED.
NOTE: 646 observations with duplicate key values were deleted.
NOTE: The data set WORK.MF_MERGED has 19604925 observations and 11 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           2.28 seconds
      cpu time            5.35 seconds
      

1087  
1088  
1089  /* ******************************************************************************** */
1090  /* Part 4:   Merge holdings with Fund characteristics ***************************** */
1091  /* ******************************************************************************** */
1092  proc sort data = MF_Port;
1093      by crsp_fundno;
1094  run;

NOTE: There were 17292 observations read from the data set WORK.MF_PORT.
NOTE: The data set WORK.MF_PORT has 17292 observations and 2 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

1095  
1096  /* get tna data */
1097  data returns1;
1098      merge MF_Port (in = in1)
1099            data.monthly_tna_ret_nav (drop = mnav);
1100      by crsp_fundno;
1101      if in1 = 1;
1102      if wficn ne .;
1103      if mtna < 0 then mtna = .;
1104      mtna = mtna + 0;
1105      mret = mret + 0;
1106      retain tna;
1107      if first.crsp_fundno or mtna ne . then tna = mtna;
1108      rename caldt = date;
1109      drop mtna;
1110  run;

NOTE: MERGE statement has more than one data set with repeats of BY values.
NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      210302 at 1104:17   96743 at 1105:17    
NOTE: There were 17292 observations read from the data set WORK.MF_PORT.
NOTE: There were 8497746 observations read from the data set DATA.MONTHLY_TNA_RET_NAV.
NOTE: The data set WORK.RETURNS1 has 2559609 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.42 seconds
      cpu time            0.40 seconds
      

1111  
1112  /* get expense ratio data required to get gross returns */
1113  proc sql;
1114      create table returns2 as
1115      select a.*, b.exp_ratio
1116      from returns1 (rename = (tna = mtna)) as a
1117      left join data.fund_fees as b
1118        on a.crsp_fundno = b.crsp_fundno
1119       and date between b.begdt and b.enddt
1120      order by crsp_fundno,
1121               date;
NOTE: Table WORK.RETURNS2 created, with 2560265 rows and 6 columns.

1122  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           1.22 seconds
      cpu time            1.87 seconds
      

1123  
1124  /* compute gross returns */
1125  data returns2;
1126      set returns2;
1127      by crsp_fundno date;
1128      if exp_ratio = -99 then exp_ratio = .;
1129      weight = lag(mtna);
1130      if first.crsp_fundno then weight = mtna;
1131      rret = sum(mret, exp_ratio / 12);
1132  run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      78755 at 1131:12    513949 at 1131:32   
NOTE: There were 2560265 observations read from the data set WORK.RETURNS2.
NOTE: The data set WORK.RETURNS2 has 2560265 observations and 8 variables.
NOTE: DATA statement used (Total process time):
      real time           0.26 seconds
      cpu time            0.26 seconds
      

1133  
1134  /* aggregate multiple share classes */
1135  proc sort data = returns2;
1136      by wficn date;
1137  run;

NOTE: There were 2560265 observations read from the data set WORK.RETURNS2.
NOTE: The data set WORK.RETURNS2 has 2560265 observations and 8 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.18 seconds
      cpu time            0.61 seconds
      

1138  
1139  data multiclass1 oneclass;
1140      set returns2;
1141      by wficn date;
1142      if first.date = 0 or last.date = 0 then output multiclass1;
1143      else output oneclass;
1144  run;

NOTE: There were 2560265 observations read from the data set WORK.RETURNS2.
NOTE: The data set WORK.MULTICLASS1 has 2035800 observations and 8 variables.
NOTE: The data set WORK.ONECLASS has 524465 observations and 8 variables.
NOTE: DATA statement used (Total process time):
      real time           0.16 seconds
      cpu time            0.15 seconds
      

1145  
1146  /* aggregate returns to the wficn-month level */
1147  proc sql;
1148      create table multiclass2 as
1149      select wficn,
1150             date,
1151             sum(mret * weight) / sum(weight) as mret,
1152             sum(mtna) as mtna,
1153             sum(rret * weight) / sum(weight) as rret
1154      from multiclass1
1155      group by wficn,
1156               date;
NOTE: Table WORK.MULTICLASS2 created, with 543345 rows and 5 columns.

1157  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.51 seconds
      cpu time            0.75 seconds
      

1158  
1159  /* create some local date vars for merging */
1160  %let md = (year(date) * 12 + month(date) - 1925 * 12 - 11);
1161  %let qd = (year(date) * 4  + qtr(date)   - 1925 * 4);
1162  
1163  data returns;
1164      set oneclass (drop = weight)
1165          multiclass2;
1166      md = &md;
1167      qd = &qd;
1168      rename mret = ret
1169             mtna = tna;
1170  run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      86 at 1:3    86 at 1:14   86 at 1:3    86 at 1:14   
NOTE: There were 524465 observations read from the data set WORK.ONECLASS.
NOTE: There were 543345 observations read from the data set WORK.MULTICLASS2.
NOTE: The data set WORK.RETURNS has 1067810 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           0.13 seconds
      cpu time            0.10 seconds
      

1171  
1172  proc sort data = returns nodupkey;
1173      by wficn md;
1174  run;

NOTE: There were 1067810 observations read from the data set WORK.RETURNS.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.RETURNS has 1067810 observations and 9 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.09 seconds
      cpu time            0.18 seconds
      

1175  
1176  * house cleaning;
1177  proc datasets nowarn nolist nodetails;
NOTE: Writing HTML Body file: sashtml.htm
1178      delete multiclass1 multiclass2 oneclass returns1 returns2;
1179  quit;

NOTE: Deleting WORK.MULTICLASS1 (memtype=DATA).
NOTE: Deleting WORK.MULTICLASS2 (memtype=DATA).
NOTE: Deleting WORK.ONECLASS (memtype=DATA).
NOTE: Deleting WORK.RETURNS1 (memtype=DATA).
NOTE: Deleting WORK.RETURNS2 (memtype=DATA).
NOTE: PROCEDURE DATASETS used (Total process time):
      real time           0.36 seconds
      cpu time            0.26 seconds
      

1180  
1181  data returns;
1182      set returns;
1183      logtna = log(tna);
1184  run;

NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100302 crsp_fundno=008035 date=20080430 ret=0.008234 tna=0 exp_ratio=0.013000
rret=0.0093168663 md=989 qd=334 logtna=. _ERROR_=1 _N_=36579
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100302 crsp_fundno=008035 date=20080530 ret=0.026726 tna=0 exp_ratio=0.013000
rret=0.0278093912 md=990 qd=334 logtna=. _ERROR_=1 _N_=36580
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100503 crsp_fundno=006788 date=20080530 ret=0.038117 tna=0 exp_ratio=0.020000
rret=0.0397832586 md=990 qd=334 logtna=. _ERROR_=1 _N_=60662
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100552 crsp_fundno=013612 date=20080630 ret=. tna=0 exp_ratio=. rret=. md=991 qd=334
logtna=. _ERROR_=1 _N_=65022
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100552 crsp_fundno=013612 date=20080731 ret=. tna=0 exp_ratio=. rret=. md=992 qd=335
logtna=. _ERROR_=1 _N_=65023
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100685 crsp_fundno=008036 date=20080430 ret=0.054511 tna=0 exp_ratio=0.015000
rret=0.0557612782 md=989 qd=334 logtna=. _ERROR_=1 _N_=79237
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100685 crsp_fundno=008036 date=20080530 ret=0.044563 tna=0 exp_ratio=0.015000
rret=0.0458132799 md=990 qd=334 logtna=. _ERROR_=1 _N_=79238
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20080430 ret=0.011013 tna=0 exp_ratio=0.022700
rret=0.0129048825 md=989 qd=334 logtna=. _ERROR_=1 _N_=91934
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20080530 ret=0.052288 tna=0 exp_ratio=0.022700
rret=0.0541792484 md=990 qd=334 logtna=. _ERROR_=1 _N_=91935
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20080630 ret=0.047619 tna=0 exp_ratio=0.022700
rret=0.0495107143 md=991 qd=334 logtna=. _ERROR_=1 _N_=91936
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20080731 ret=-0.033597 tna=0 exp_ratio=0.021700
rret=-0.031788505 md=992 qd=335 logtna=. _ERROR_=1 _N_=91937
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20080829 ret=-0.036810 tna=0 exp_ratio=0.021700
rret=-0.035001483 md=993 qd=335 logtna=. _ERROR_=1 _N_=91938
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20080930 ret=-0.097665 tna=0 exp_ratio=0.021700
rret=-0.09585621 md=994 qd=335 logtna=. _ERROR_=1 _N_=91939
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20081031 ret=0.002353 tna=0 exp_ratio=0.021700
rret=0.0041612745 md=995 qd=336 logtna=. _ERROR_=1 _N_=91940
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20081128 ret=0.002347 tna=0 exp_ratio=0.021700
rret=0.0041557512 md=996 qd=336 logtna=. _ERROR_=1 _N_=91941
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20081231 ret=0.000000 tna=0 exp_ratio=0.021700
rret=0.0018083333 md=997 qd=336 logtna=. _ERROR_=1 _N_=91942
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20090130 ret=-0.002342 tna=0 exp_ratio=0.021700
rret=-0.000533587 md=998 qd=337 logtna=. _ERROR_=1 _N_=91943
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20090227 ret=-0.002347 tna=0 exp_ratio=0.021700
rret=-0.000539085 md=999 qd=337 logtna=. _ERROR_=1 _N_=91944
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
wficn=100789 crsp_fundno=009208 date=20090331 ret=0.000000 tna=0 exp_ratio=0.021700
rret=0.0018083333 md=1000 qd=337 logtna=. _ERROR_=1 _N_=91945
NOTE: Invalid argument to function LOG(0) at line 1183 column 14.
WARNING: Limit set by ERRORS= option reached.  Further errors of this type will not be printed.
wficn=100789 crsp_fundno=009208 date=20090430 ret=0.000000 tna=0 exp_ratio=0.021700
rret=0.0018083333 md=1001 qd=338 logtna=. _ERROR_=1 _N_=91946
NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      9112 at 1183:14   
NOTE: Mathematical operations could not be performed at the following places. The results of the 
      operations have been set to missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      179 at 1183:14   
NOTE: There were 1067810 observations read from the data set WORK.RETURNS.
NOTE: The data set WORK.RETURNS has 1067810 observations and 10 variables.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      cpu time            0.06 seconds
      

1185  
1186  * Obtain fund characteristics ;
1187  %let md = (year(caldt) * 12 + month(caldt) - 1925 * 12 - 11);
1188  %let qd = (year(caldt) * 4  + qtr(caldt)   - 1925 * 4);
1189  
1190  /* Get fund characteritics data */
1191  data fundchars;
1192      merge MF_Port (in = in1)
1193            data.fund_summary2;
1194      by crsp_fundno;
1195      md       = &md;
1196      qd       = &qd;
1197      fundage  = log(year(caldt) - year(first_offer_dt));
1198      per_cash2 = sum(per_cash, per_muni, per_govt) / 100;
1199      per_cash  = per_cash / 100;
1200      if wficn ne .;
1201      rename caldt = date;
1202      keep crsp_fundno wficn caldt date mgmt_fee turn_ratio first_offer_dt
1203           mgmt_name mgmt_cd fundage md qd per_cash per_muni per_govt
1204           per_cash2 nav_latest;
1205  run;

WARNING: The variable date in the DROP, KEEP, or RENAME list has never been referenced.
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000001 summary_period2=A caldt=19971231 summary_period=A
nav_latest=15.3000000 nav_latest_dt=19971231 tna_latest=81.000 tna_latest_dt=19971231
yield=0.0620065359 div_ytd=0.94870000000 cap_gains_ytd=0.02000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19980630 per_com=0
per_pref=0 per_conv=0 per_corp=88.13 per_muni=0 per_govt=3.34 per_oth=0.02 per_cash=0.0851
per_bond=0 per_abs=. per_mbs=. per_eq_oth=. per_fi_oth=. maturity=9.8 maturity_dt=19980630
cusip8=  crsp_portno=. crsp_cl_grp=. fund_name=AARP Income Tr:Bond for Income ticker=AABIX
ncusip=  mgmt_name=SCUDDER STEVENS & CLARK mgmt_cd=  mgr_name=Stephen A Wohler mgr_dt=19970201
adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N
et_flag=  delist_cd=  header=0 first_offer_dt=19970201 end_dt=20000731 dead_flag=Y
merge_fundno=008441 actual_12b1=0.000000 max_12b1=. mgmt_fee=-0.282000 exp_ratio=0.001900
turn_ratio=1.310000 fiscal_yearend=19980930 crsp_obj_cd=ICQM si_obj_cd=CMQ accrual_fund= 
sales_restrict=  wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd= 
lipper_obj_name=  lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=865
qd=292 fundage=. per_cash2=0.1185 _ERROR_=1 _N_=1
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=1 wficn=301534 crsp_fundno=000002 summary_period2=A caldt=19971231 summary_period=A
nav_latest=17.0900000 nav_latest_dt=19971231 tna_latest=72.000 tna_latest_dt=19971231
yield=0.0187244002 div_ytd=0.32000000000 cap_gains_ytd=0.10000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19980630 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=98.55 per_cash=0.0145 per_bond=0
per_abs=. per_mbs=. per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=.
crsp_cl_grp=. fund_name=AARP Mngd Inv Port Tr:Diversified Growth ticker=AADGX ncusip= 
mgmt_name=SCUDDER STEVENS & CLARK mgmt_cd=  mgr_name=Philip S Fortuna mgr_dt=19970201 adv_name= 
open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N et_flag= 
delist_cd=  header=0 first_offer_dt=19970203 end_dt=20000831 dead_flag=Y merge_fundno=008425
actual_12b1=0.000000 max_12b1=. mgmt_fee=0.000000 exp_ratio=0.000000 turn_ratio=0.060000
fiscal_yearend=19980930 crsp_obj_cd=EDYG si_obj_cd=GRO accrual_fund=  sales_restrict= 
wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name= 
lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=865 qd=292 fundage=.
per_cash2=0.0145 _ERROR_=1 _N_=10
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000003 summary_period2=A caldt=19931231 summary_period=A
nav_latest=10.4200000 nav_latest_dt=19931231 tna_latest=0.013 tna_latest_dt=19931231
yield=0.0574856046 div_ytd=0.59900000000 cap_gains_ytd=0.40580000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19931231 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=.
per_mbs=. per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=Rembrandt Funds:Global Fixed Income Fund/Inv ticker=  ncusip= 
mgmt_name=LaSalle Street Capital Mgmt Ltd mgmt_cd=  mgr_name=Roy Scheepe mgr_dt=19930201
adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N
et_flag=  delist_cd=  header=0 first_offer_dt=19930426 end_dt=20000831 dead_flag=Y merge_fundno=.
actual_12b1=0.002500 max_12b1=. mgmt_fee=. exp_ratio=0.015600 turn_ratio=1.460000
fiscal_yearend=. crsp_obj_cd=IF si_obj_cd=BGN accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name=  lipper_asset_cd= 
lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=817 qd=276 fundage=. per_cash2=0
_ERROR_=1 _N_=19
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000004 summary_period2=A caldt=19971231 summary_period=A
nav_latest=16.4600000 nav_latest_dt=19971231 tna_latest=23.800 tna_latest_dt=19971231
yield=0.0066828676 div_ytd=0.11000000000 cap_gains_ytd=0.15000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19980630
per_com=91.3 per_pref=1.1 per_conv=1.4 per_corp=0 per_muni=0 per_govt=0 per_oth=0.3
per_cash=0.059 per_bond=0 per_abs=. per_mbs=. per_eq_oth=. per_fi_oth=. maturity=0.0
maturity_dt=19980630 cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=AARP Growth Tr:International Growth & Income ticker=AAISX ncusip= 
mgmt_name=SCUDDER STEVENS & CLARK mgmt_cd=  mgr_name=Sheridan Reilly mgr_dt=19970201 adv_name= 
open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N et_flag= 
delist_cd=  header=0 first_offer_dt=19970203 end_dt=20000731 dead_flag=Y merge_fundno=008513
actual_12b1=0.000000 max_12b1=. mgmt_fee=0.222000 exp_ratio=0.017500 turn_ratio=0.750000
fiscal_yearend=19980930 crsp_obj_cd=EFYT si_obj_cd=EIT accrual_fund=  sales_restrict= 
wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name= 
lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=865 qd=292 fundage=.
per_cash2=0.059 _ERROR_=1 _N_=32
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000008 summary_period2=A caldt=19901231 summary_period=A
nav_latest=13.2700000 nav_latest_dt=19901231 tna_latest=0.160 tna_latest_dt=19901231
yield=0.0021929164 div_ytd=0.02910000000 cap_gains_ytd=0.00000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19901231 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=.
per_mbs=. per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=EQUITABLE BALANCED FUND/A ticker=  ncusip=  mgmt_name=  mgmt_cd=  mgr_name= 
mgr_dt=19900901 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag= 
vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19900101 end_dt=19990129 dead_flag=Y
merge_fundno=004089 actual_12b1=. max_12b1=. mgmt_fee=. exp_ratio=0.000000 turn_ratio=.
fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name=  lipper_asset_cd= 
lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=781 qd=264 fundage=. per_cash2=0
_ERROR_=1 _N_=54
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000009 summary_period2=A caldt=19871231 summary_period=A
nav_latest=10.7000000 nav_latest_dt=19871231 tna_latest=1.980 tna_latest_dt=19871231
yield=0.0002336449 div_ytd=0.00250000000 cap_gains_ytd=0.05510000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19871231 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=.
per_mbs=. per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=Equitable Balanced B ticker=  ncusip=  mgmt_name=  mgmt_cd=  mgr_name=  mgr_dt=19871001
adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N
et_flag=  delist_cd=  header=0 first_offer_dt=19870101 end_dt=19990129 dead_flag=Y
merge_fundno=004090 actual_12b1=. max_12b1=. mgmt_fee=. exp_ratio=0.000000 turn_ratio=.
fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name=  lipper_asset_cd= 
lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=745 qd=252 fundage=. per_cash2=0
_ERROR_=1 _N_=64
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000010 summary_period2=A caldt=19931231 summary_period=A
nav_latest=15.2500000 nav_latest_dt=19931231 tna_latest=0.971 tna_latest_dt=19931231
yield=0.008852459 div_ytd=0.13500000000 cap_gains_ytd=1.17000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19940630
per_com=54.5 per_pref=0 per_conv=2.7 per_corp=4.7 per_muni=0 per_govt=13.1 per_oth=0
per_cash=0.25 per_bond=0 per_abs=. per_mbs=. per_eq_oth=. per_fi_oth=. maturity=0.0
maturity_dt=19940630 cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=Alliance Port:Strategic Balanced Fund/C ticker=  ncusip= 
mgmt_name=ALLIANCE CAPITAL MANAGEMENT CORP. mgmt_cd=  mgr_name=Judith Taylor mgr_dt=19930801
adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N
et_flag=  delist_cd=  header=0 first_offer_dt=19930101 end_dt=19990129 dead_flag=Y
merge_fundno=004091 actual_12b1=0.010000 max_12b1=. mgmt_fee=. exp_ratio=0.021000 turn_ratio=.
fiscal_yearend=. crsp_obj_cd=M si_obj_cd=BAL accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name=  lipper_asset_cd= 
lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=817 qd=276 fundage=. per_cash2=0.381
_ERROR_=1 _N_=77
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000012 summary_period2=A caldt=19941230 summary_period=A
nav_latest=14.3200000 nav_latest_dt=19941230 tna_latest=177.932 tna_latest_dt=19941230
yield=0.0275837989 div_ytd=0.39500000000 cap_gains_ytd=0.03900000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19950929 per_com=52
per_pref=0 per_conv=4 per_corp=4 per_muni=0 per_govt=19 per_oth=3 per_cash=0.18 per_bond=0
per_abs=. per_mbs=. per_eq_oth=. per_fi_oth=. maturity=0.0 maturity_dt=19950929 cusip8= 
crsp_portno=. crsp_cl_grp=. fund_name=AARP Growth Tr:Balanced Stock and Bond Fund ticker=ABSBX
ncusip=  mgmt_name=SCUDDER STEVENS & CLARK mgmt_cd=  mgr_name=Robert T Hoffman mgr_dt=19940201
adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N
et_flag=  delist_cd=  header=0 first_offer_dt=19940201 end_dt=20000731 dead_flag=Y
merge_fundno=028248 actual_12b1=0.000000 max_12b1=. mgmt_fee=. exp_ratio=0.010100
turn_ratio=0.637700 fiscal_yearend=. crsp_obj_cd=M si_obj_cd=BAL accrual_fund=  sales_restrict= 
wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name= 
lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=829 qd=280 fundage=.
per_cash2=0.37 _ERROR_=1 _N_=90
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000015 summary_period2=A caldt=19911231 summary_period=A
nav_latest=10.1700000 nav_latest_dt=19911231 tna_latest=5.750 tna_latest_dt=19911231 yield=.
div_ytd=0.00000000000 cap_gains_ytd=0.06000000000 nav_52w_h=. nav_52w_h_dt=. nav_52w_l=.
nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19911231 per_com=0 per_pref=0
per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=. per_mbs=.
per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=AMERICAN CAPITAL GLOBAL EQUITY FUND/A ticker=  ncusip=  mgmt_name=  mgmt_cd= 
mgr_name=  mgr_dt=19910801 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N
index_fund_flag=  vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19910101
end_dt=19980529 dead_flag=Y merge_fundno=031048 actual_12b1=. max_12b1=. mgmt_fee=.
exp_ratio=0.000000 turn_ratio=. fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund= 
sales_restrict=  wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd= 
lipper_obj_name=  lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=793
qd=268 fundage=. per_cash2=0 _ERROR_=1 _N_=121
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000016 summary_period2=A caldt=19911231 summary_period=A
nav_latest=10.2300000 nav_latest_dt=19911231 tna_latest=0.558 tna_latest_dt=19911231 yield=.
div_ytd=0.00000000000 cap_gains_ytd=0.06000000000 nav_52w_h=. nav_52w_h_dt=. nav_52w_l=.
nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19911231 per_com=0 per_pref=0
per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=. per_mbs=.
per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=AMERICAN CAPITAL GLOBAL EQUITY FUND/B ticker=  ncusip=  mgmt_name=  mgmt_cd= 
mgr_name=  mgr_dt=19911101 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N
index_fund_flag=  vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19910101
end_dt=19980529 dead_flag=Y merge_fundno=031046 actual_12b1=. max_12b1=. mgmt_fee=.
exp_ratio=0.000000 turn_ratio=. fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund= 
sales_restrict=  wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd= 
lipper_obj_name=  lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=793
qd=268 fundage=. per_cash2=0 _ERROR_=1 _N_=129
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000017 summary_period2=A caldt=19931231 summary_period=A
nav_latest=11.5500000 nav_latest_dt=19931231 tna_latest=2.570 tna_latest_dt=19931231 yield=.
div_ytd=0.00000000000 cap_gains_ytd=0.04250000000 nav_52w_h=. nav_52w_h_dt=. nav_52w_l=.
nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19940630 per_com=93 per_pref=0
per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0.07 per_bond=0 per_abs=.
per_mbs=. per_eq_oth=. per_fi_oth=. maturity=0.0 maturity_dt=19940630 cusip8=  crsp_portno=.
crsp_cl_grp=. fund_name=American Capital World:Global Equity Fund/C ticker=ACGCX ncusip= 
mgmt_name=AMERICAN CAPITAL ASSET MANAGEMENT mgmt_cd=  mgr_name=Jeff New mgr_dt=19940401
adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N
et_flag=  delist_cd=  header=0 first_offer_dt=19930101 end_dt=19980529 dead_flag=Y
merge_fundno=031045 actual_12b1=0.010000 max_12b1=. mgmt_fee=. exp_ratio=0.032100
turn_ratio=1.160000 fiscal_yearend=. crsp_obj_cd=EFYG si_obj_cd=EGG accrual_fund= 
sales_restrict=  wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd= 
lipper_obj_name=  lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=817
qd=276 fundage=. per_cash2=0.07 _ERROR_=1 _N_=137
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000018 summary_period2=A caldt=19761231 summary_period=A
nav_latest=24.5800000 nav_latest_dt=19761231 tna_latest=11.100 tna_latest_dt=19761231 yield=.
div_ytd=0.00000000000 cap_gains_ytd=0.00000000000 nav_52w_h=. nav_52w_h_dt=. nav_52w_l=.
nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19761231 per_com=0 per_pref=0
per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=. per_mbs=.
per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=American General Muni Bond Fund ticker=ACMBX ncusip=  mgmt_name=  mgmt_cd=  mgr_name= 
mgr_dt=19880101 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag= 
vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19760101 end_dt=19950831 dead_flag=Y
merge_fundno=030948 actual_12b1=. max_12b1=. mgmt_fee=. exp_ratio=0.000000 turn_ratio=.
fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=Bonds lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name= 
lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=613 qd=208 fundage=.
per_cash2=0 _ERROR_=1 _N_=143
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000019 summary_period2=A caldt=19921231 summary_period=A
nav_latest=10.0200000 nav_latest_dt=19921231 tna_latest=3.773 tna_latest_dt=19921231
yield=0.0185628743 div_ytd=0.18600000000 cap_gains_ytd=0.00000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19930331 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=95 per_govt=0 per_oth=0 per_cash=0.05 per_bond=0
per_abs=. per_mbs=. per_eq_oth=. per_fi_oth=. maturity=21.3 maturity_dt=19930331 cusip8= 
crsp_portno=. crsp_cl_grp=. fund_name=AMERICAN CAPITAL MUNICIPAL BOND FUND/B ticker=  ncusip= 
mgmt_name=AMERICAN CAPITAL ASSET MANAGEMENT mgmt_cd=  mgr_name=ROBERT EVANS mgr_dt=19920901
adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N
et_flag=  delist_cd=  header=0 first_offer_dt=19920101 end_dt=19950831 dead_flag=Y
merge_fundno=030949 actual_12b1=0.010000 max_12b1=. mgmt_fee=. exp_ratio=0.017100 turn_ratio=.
fiscal_yearend=. crsp_obj_cd=IU si_obj_cd=MGN accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name=  lipper_asset_cd= 
lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=805 qd=272 fundage=. per_cash2=1
_ERROR_=1 _N_=163
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000020 summary_period2=A caldt=19931231 summary_period=A
nav_latest=10.5200000 nav_latest_dt=19931231 tna_latest=4.137 tna_latest_dt=19931231
yield=0.0199619772 div_ytd=0.21000000000 cap_gains_ytd=0.00000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19931231 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=.
per_mbs=. per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=American Capital Municipal Bond Fund/C ticker=  ncusip=  mgmt_name=  mgmt_cd= 
mgr_name=  mgr_dt=19950401 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N
index_fund_flag=  vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19930101
end_dt=19950831 dead_flag=Y merge_fundno=030950 actual_12b1=. max_12b1=. mgmt_fee=.
exp_ratio=0.000000 turn_ratio=. fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund= 
sales_restrict=  wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd= 
lipper_obj_name=  lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=817
qd=276 fundage=. per_cash2=0 _ERROR_=1 _N_=167
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000021 summary_period2=A caldt=19901231 summary_period=A
nav_latest=9.9800000 nav_latest_dt=19901231 tna_latest=15.582 tna_latest_dt=19901231
yield=0.0095190381 div_ytd=0.09500000000 cap_gains_ytd=0.00000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19901231 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=.
per_mbs=. per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=AMERICAN CAPITAL GOVERNMENT TGT SRS-PORT '97 ticker=  ncusip=  mgmt_name=  mgmt_cd= 
mgr_name=  mgr_dt=19900901 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N
index_fund_flag=  vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19900101
end_dt=19971128 dead_flag=Y merge_fundno=. actual_12b1=. max_12b1=. mgmt_fee=. exp_ratio=0.000000
turn_ratio=. fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund=  sales_restrict= 
wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name= 
lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=781 qd=264 fundage=.
per_cash2=0 _ERROR_=1 _N_=170
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000022 summary_period2=A caldt=19911231 summary_period=A
nav_latest=10.7600000 nav_latest_dt=19911231 tna_latest=8.795 tna_latest_dt=19911231
yield=0.0269516729 div_ytd=0.29000000000 cap_gains_ytd=0.04250000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19911231 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=.
per_mbs=. per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=AMERICAN CAPITAL GOVERNMENT TGT SRS-PORT '98 ticker=  ncusip=  mgmt_name=  mgmt_cd= 
mgr_name=  mgr_dt=19910101 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N
index_fund_flag=  vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19910101
end_dt=19930331 dead_flag=Y merge_fundno=006281 actual_12b1=. max_12b1=. mgmt_fee=.
exp_ratio=0.000000 turn_ratio=. fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund= 
sales_restrict=  wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd= 
lipper_obj_name=  lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=793
qd=268 fundage=. per_cash2=0 _ERROR_=1 _N_=178
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000024 summary_period2=A caldt=19901231 summary_period=A
nav_latest=9.9000000 nav_latest_dt=19901231 tna_latest=26.050 tna_latest_dt=19901231
yield=0.0001010101 div_ytd=0.00100000000 cap_gains_ytd=0.00000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19901231 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=.
per_mbs=. per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=Axe-Core Int'l ADR Fund ticker=  ncusip=  mgmt_name=  mgmt_cd=  mgr_name= 
mgr_dt=19901101 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag= 
vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19900101 end_dt=19920630 dead_flag=Y
merge_fundno=. actual_12b1=. max_12b1=. mgmt_fee=. exp_ratio=0.000000 turn_ratio=.
fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name=  lipper_asset_cd= 
lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=781 qd=264 fundage=. per_cash2=0
_ERROR_=1 _N_=182
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=1 wficn=100154 crsp_fundno=000025 summary_period2=A caldt=19921231 summary_period=A
nav_latest=17.6200000 nav_latest_dt=19921231 tna_latest=0.285 tna_latest_dt=19921231 yield=.
div_ytd=0.00000000000 cap_gains_ytd=0.00000000000 nav_52w_h=. nav_52w_h_dt=. nav_52w_l=.
nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19921231 per_com=0 per_pref=0
per_conv=0 per_corp=0 per_muni=0 per_govt=0 per_oth=0 per_cash=0 per_bond=0 per_abs=. per_mbs=.
per_eq_oth=. per_fi_oth=. maturity=. maturity_dt=. cusip8=  crsp_portno=. crsp_cl_grp=.
fund_name=Ambassador Funds:Established Co Gr/Retail A ticker=  ncusip=  mgmt_name=  mgmt_cd= 
mgr_name=  mgr_dt=19930501 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N
index_fund_flag=  vau_fund=N et_flag=  delist_cd=  header=0 first_offer_dt=19920101
end_dt=19950531 dead_flag=Y merge_fundno=021286 actual_12b1=. max_12b1=. mgmt_fee=.
exp_ratio=0.000000 turn_ratio=. fiscal_yearend=. crsp_obj_cd=  si_obj_cd=  accrual_fund= 
sales_restrict=  wbrger_obj_cd=  policy=  lipper_class=  lipper_class_name=  lipper_obj_cd= 
lipper_obj_name=  lipper_asset_cd=  lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=805
qd=272 fundage=. per_cash2=0 _ERROR_=1 _N_=185
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
in1=0 wficn=. crsp_fundno=000026 summary_period2=A caldt=19951229 summary_period=A
nav_latest=10.2100000 nav_latest_dt=19951229 tna_latest=0.202 tna_latest_dt=19951229
yield=0.0266405485 div_ytd=0.27200000000 cap_gains_ytd=0.05100000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19960329 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=97.4 per_govt=0 per_oth=0 per_cash=0.026 per_bond=0
per_abs=. per_mbs=. per_eq_oth=. per_fi_oth=. maturity=0.0 maturity_dt=19960329 cusip8= 
crsp_portno=. crsp_cl_grp=. fund_name=Achievement Fds Trust:Short Term Muni/Retail ticker= 
ncusip=  mgmt_name=SEI FINANCIAL MANAGEMENT CORP. mgmt_cd=  mgr_name=James A Schuck
mgr_dt=19950301 adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag= 
vau_fund=N et_flag=  delist_cd=L header=1 first_offer_dt=19950101 end_dt=19990331 dead_flag=Y
merge_fundno=. actual_12b1=0.002500 max_12b1=. mgmt_fee=. exp_ratio=0.010000 turn_ratio=.
fiscal_yearend=. crsp_obj_cd=IUS si_obj_cd=MSM accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name=  lipper_asset_cd= 
lipper_tax_cd=  FIRST.crsp_fundno=0 LAST.crsp_fundno=0 md=841 qd=284 fundage=. per_cash2=1
_ERROR_=1 _N_=190
NOTE: Invalid argument to function LOG(0) at line 1197 column 16.
WARNING: Limit set by ERRORS= option reached.  Further errors of this type will not be printed.
in1=0 wficn=. crsp_fundno=000028 summary_period2=A caldt=19921231 summary_period=A
nav_latest=11.3500000 nav_latest_dt=19921231 tna_latest=11.986 tna_latest_dt=19921231
yield=0.0220264317 div_ytd=0.25000000000 cap_gains_ytd=0.00000000000 nav_52w_h=. nav_52w_h_dt=.
nav_52w_l=. nav_52w_l_dt=. unrealized_app_dep=. unrealized_app_dt=. asset_dt=19930331 per_com=0
per_pref=0 per_conv=0 per_corp=0 per_muni=90 per_govt=0 per_oth=0 per_cash=0.1 per_bond=0
per_abs=. per_mbs=. per_eq_oth=. per_fi_oth=. maturity=19.6 maturity_dt=19930331 cusip8= 
crsp_portno=. crsp_cl_grp=. fund_name=AMERICAN CAPITAL TXEX TRUST-INSURED MUNI/B ticker=ACTJX
ncusip=  mgmt_name=AMERICAN CAPITAL ASSET MANAGEMENT mgmt_cd=  mgr_name=BOB EVANS mgr_dt=19920701
adv_name=  open_to_inv=  retail_fund=  inst_fund=  m_fund=N index_fund_flag=  vau_fund=N
et_flag=  delist_cd=  header=0 first_offer_dt=19920101 end_dt=19950831 dead_flag=Y
merge_fundno=030993 actual_12b1=0.010000 max_12b1=. mgmt_fee=. exp_ratio=0.018200 turn_ratio=.
fiscal_yearend=. crsp_obj_cd=IU si_obj_cd=MIS accrual_fund=  sales_restrict=  wbrger_obj_cd= 
policy=  lipper_class=  lipper_class_name=  lipper_obj_cd=  lipper_obj_name=  lipper_asset_cd= 
lipper_tax_cd=  FIRST.crsp_fundno=1 LAST.crsp_fundno=0 md=805 qd=272 fundage=. per_cash2=1
_ERROR_=1 _N_=206
NOTE: MERGE statement has more than one data set with repeats of BY values.
NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      13 at 1:3           13 at 1:15          13 at 1:3           13 at 1:15
      24043 at 1197:16    13 at 1197:20       24043 at 1197:32    24043 at 1197:34
      453569 at 1198:17   453569 at 1198:51   453569 at 1199:26   
NOTE: Mathematical operations could not be performed at the following places. The results of the 
      operations have been set to missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      123000 at 1197:16   
NOTE: There were 17292 observations read from the data set WORK.MF_PORT.
NOTE: There were 2500116 observations read from the data set DATA.FUND_SUMMARY2.
NOTE: The data set WORK.FUNDCHARS has 737202 observations and 16 variables.
NOTE: DATA statement used (Total process time):
      real time           0.86 seconds
      cpu time            0.86 seconds
      

1206  
1207  proc sort data = fundchars;
1208      by wficn date;
1209  run;

NOTE: There were 737202 observations read from the data set WORK.FUNDCHARS.
NOTE: The data set WORK.FUNDCHARS has 737202 observations and 16 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.14 seconds
      cpu time            0.28 seconds
      

1210  
1211  * Get hand-checked management name and code;
1212  proc import out      = std_mgmt_names
1213              datafile =
1213! 'C:/Users/hpham13/Projects/mf_activism/empirical/0_input/original/mff_names_dedup2023.xlsx'
1214              dbms     = xlsx
1215              replace;
1216  run;

NOTE: One or more variables were converted because the data type is not supported by the V9 
      engine. For more details, run with options MSGLEVEL=I.
NOTE: The import data set has 3132 observations and 7 variables.
NOTE: WORK.STD_MGMT_NAMES data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.11 seconds
      cpu time            0.09 seconds
      

1217  
1218  proc sort data = std_mgmt_names nodupkey;
1219      by mgmt_name;
1220  run;

NOTE: There were 3132 observations read from the data set WORK.STD_MGMT_NAMES.
NOTE: 327 observations with duplicate key values were deleted.
NOTE: The data set WORK.STD_MGMT_NAMES has 2805 observations and 7 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

1221  
1222  proc sql;
1223      create table fundchars as
1224      select a.*,
1225             b.corrected_mgmt_cd
1226      from fundchars as a
1227      left join std_mgmt_names as b
1228        on a.mgmt_name = b.mgmt_name;
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.FUNDCHARS created, with 737202 rows and 17 columns.

1229  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.27 seconds
      cpu time            0.48 seconds
      

1230  
1231  * if corrected_mgmt_cd is missing, replace by original mgmt_cd and rename ;
1232  data fundchars;
1233      set fundchars;
1234      if missing(corrected_mgmt_cd) and not missing(mgmt_cd) then corrected_mgmt_cd = mgmt_cd
1234! ;
1235      if missing(corrected_mgmt_cd) and missing(mgmt_cd) and not missing(mgmt_name) then
1235! corrected_mgmt_cd = mgmt_name;
1236      drop mgmt_cd;
1237      label corrected_mgmt_cd = "Management Company Code";
1238      rename corrected_mgmt_cd = mgmt_cd;
1239  run;

NOTE: There were 737202 observations read from the data set WORK.FUNDCHARS.
NOTE: The data set WORK.FUNDCHARS has 737202 observations and 16 variables.
NOTE: DATA statement used (Total process time):
      real time           0.10 seconds
      cpu time            0.11 seconds
      

1240  
1241  /* Merge data*/
1242  proc sql;
1243      create table returns_merged as
1244      select a.*, b.crsp_fundno, b.fundage, b.turn_ratio, b.md, b.qd, b.mgmt_name, b.mgmt_cd,
1245             b.per_cash, b.per_muni, b.per_govt, b.per_cash2, (b.per_cash * a.tna) as mfcash,
1246             (b.per_cash2 * a.tna) as mfcash2, b.nav_latest
1247      from returns (where = (date between "&begdate"d and "&enddate"d)) as a
1248      left join fundchars as b
1249        on a.wficn = b.wficn
1250       and a.qd    = b.qd;
WARNING: Variable crsp_fundno already exists on file WORK.RETURNS_MERGED.
WARNING: Variable md already exists on file WORK.RETURNS_MERGED.
WARNING: Variable qd already exists on file WORK.RETURNS_MERGED.
NOTE: Table WORK.RETURNS_MERGED created, with 2187051 rows and 21 columns.

1251  
1252      create view MF_merged2 as
1253      select a.*, b.tna label = 'TNA ($millions)', b.exp_ratio, b.rret, b.mgmt_name,
1253! b.mgmt_cd
1254      from MF_merged as a
1255      left join
1256           ( select wficn, md, qd, tna, exp_ratio, rret, mgmt_name, mgmt_cd
1257               from returns_merged
1258           ) as b
1259        on a.wficn = b.wficn
1260       and a.md    = b.md;
NOTE: SQL view WORK.MF_MERGED2 has been defined.
1261  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.93 seconds
      cpu time            1.17 seconds
      

1262  
1263  
1264  /* ******************************************************************************** */
1265  /* Part 5:   Compute ownership and define large holding families   **************** */
1266  /* ******************************************************************************** */
1267  proc sort data = MF_merged2
1268            out  = MF_merged3
1269            nodupkey;
1270      by permno rdate wficn;
1271  run;

NOTE: There were 57018050 observations read from the data set WORK.MF_MERGED2.
NOTE: 37413125 observations with duplicate key values were deleted.
NOTE: The data set WORK.MF_MERGED3 has 19604925 observations and 16 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           13.65 seconds
      cpu time            30.85 seconds
      

1272  
1273  data MF_merged3;
1274      set MF_merged3;
1275      if rdate ne .;
1276      if not missing(mgmt_cd);
1277  run;

NOTE: There were 19604925 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 17727460 observations and 16 variables.
NOTE: DATA statement used (Total process time):
      real time           2.37 seconds
      cpu time            2.26 seconds
      

1278  
1279  proc sql;
1280      create table MF_merged3 as
1281      select *,
1282             sum(shares_adj) as shares_adj_mff
1283      from MF_merged3
1284      group by permno, rdate, mgmt_cd;
NOTE: The query requires remerging summary statistics back with the original data.
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.MF_MERGED3 created, with 17727460 rows and 17 columns.

1285  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           10.83 seconds
      cpu time            14.65 seconds
      

1286  
1287  proc sql;
1288      create table MF_merged3 as
1289      select *,
1290             count(distinct permno) as num_firms
1291      from MF_merged3
1292      group by mgmt_cd, rdate;
NOTE: The query requires remerging summary statistics back with the original data.
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.MF_MERGED3 created, with 17727460 rows and 18 columns.

1293  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           10.21 seconds
      cpu time            15.48 seconds
      

1294  
1295  proc sort data = MF_merged3;
1296      by permno rdate mgmt_cd;
1297  run;

NOTE: There were 17727460 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 17727460 observations and 18 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           4.20 seconds
      cpu time            9.93 seconds
      

1298  
1299  * follow the literature, we exclude observations with TNA does not exceed $1mil and
1299! num_firms does not exceed 10;
1300  data MF_merged3;
1301      set MF_merged3;
1302      if tna > 1;
1303      if num_firms > 10;
1304  run;

NOTE: There were 17727460 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 17660353 observations and 18 variables.
NOTE: DATA statement used (Total process time):
      real time           2.91 seconds
      cpu time            2.31 seconds
      

1305  
1306  data MF_merged3;
1307      set MF_merged3;
1308      drop shares_adj exp_ratio rret;
1309  run;

NOTE: There were 17660353 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 17660353 observations and 15 variables.
NOTE: DATA statement used (Total process time):
      real time           2.31 seconds
      cpu time            2.14 seconds
      

1310  
1311  data MF_merged3;
1312      set MF_merged3;
1313      rename shares_adj_mff = shares_adj;
1314      label shares_adj_mff = "Total shares at MFF";
1315  run;

NOTE: There were 17660353 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 17660353 observations and 15 variables.
NOTE: DATA statement used (Total process time):
      real time           2.35 seconds
      cpu time            2.12 seconds
      

1316  
1317  * get TSO ;
1318  data MF_merged3;
1319      merge MF_merged3 (in = a)
1320            price      (in = b rename = (qdate = rdate));
1321      by permno rdate;
1322      if b and TSO > 0;
1323      MFOR = shares_adj / TSO;
1324      label MFOR = "MFOwn MFF-Firm-Level";
1325      format MFOR percentn8.4;
1326      format ME P_1 P comma8.4;
1327      if wficn ne .;
1328  run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      369444 at 1323:23   
NOTE: There were 17660353 observations read from the data set WORK.MF_MERGED3.
NOTE: There were 788968 observations read from the data set WORK.PRICE.
NOTE: The data set WORK.MF_MERGED3 has 14317291 observations and 22 variables.
NOTE: DATA statement used (Total process time):
      real time           2.79 seconds
      cpu time            2.71 seconds
      

1329  
1330  * Compute the firm weight in a mutual fund portfolio at the mutual fund - quarter level;
1331  proc sql;
1332      create table MF_merged3 as
1333      select *,
1334             (shares_adj * P) / sum(shares_adj * P) as fweight
1335                 label  = "Firm weight"
1336                 format = percentn8.4
1337      from MF_merged3
1338      group by mgmt_cd, rdate
1339      order by mgmt_cd, rdate, permno;
NOTE: The query requires remerging summary statistics back with the original data.
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.MF_MERGED3 created, with 14317291 rows and 23 columns.

1340  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           9.83 seconds
      cpu time            19.48 seconds
      

1341  
1342  data MF_merged3;
1343      set MF_merged3;
1344      drop wficn fundno crsp_fundno;
1345      if not missing(mgmt_cd);
1346      ryear = year(rdate);
1347  run;

NOTE: There were 14317291 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 14317291 observations and 21 variables.
NOTE: DATA statement used (Total process time):
      real time           2.41 seconds
      cpu time            2.36 seconds
      

1348  proc sort data = MF_merged3 nodupkey;
1349      by mgmt_cd permno rdate;
1350  run;

NOTE: There were 14317291 observations read from the data set WORK.MF_MERGED3.
NOTE: 5172414 observations with duplicate key values were deleted.
NOTE: The data set WORK.MF_MERGED3 has 9144877 observations and 21 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           3.30 seconds
      cpu time            7.06 seconds
      

1351  
1352  * require at least 2 obs to calcuate the difference;
1353  proc sql;
1354      create table MF_merged3 as
1355      select *
1356      from MF_merged3
1357      group by mgmt_cd, permno
1358      having count(*) >= 2;
NOTE: The query requires remerging summary statistics back with the original data.
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.MF_MERGED3 created, with 8900900 rows and 21 columns.

1359  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           2.94 seconds
      cpu time            2.79 seconds
      

1360  
1361  data MF_merged3;
1362      set MF_merged3;
1363      drop ryear;
1364  run;

NOTE: There were 8900900 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 8900900 observations and 20 variables.
NOTE: DATA statement used (Total process time):
      real time           1.54 seconds
      cpu time            1.32 seconds
      

1365  
1366  * Compute the change of ownership and change of Firm weight;
1367  proc sort data = MF_merged3;
1368      by mgmt_cd permno rdate;
1369  run;

NOTE: There were 8900900 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 8900900 observations and 20 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           2.38 seconds
      cpu time            4.54 seconds
      

1370  
1371  data MF_merged3;
1372      set MF_merged3;
1373      by mgmt_cd permno;
1374      MFOR_l    = lag(MFOR);
1375      fweight_l = lag(fweight);
1376      if first.permno then MFOR_l    = .;
1377      if first.permno then fweight_l = .;
1378      changefweight = fweight - fweight_l;
1379      changeMFOR    = MFOR - MFOR_l;
1380      /* assume no change for the first obs */
1381      if first.permno then changefweight = 0;
1382      if first.permno then changeMFOR    = 0;
1383      if first.permno then delete;
1384      drop MFOR_l fweight_l;
1385      format fweight changefweight MFOR changeMFOR percentn8.4;
1386  run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      868865 at 1378:29   863219 at 1379:26   
NOTE: There were 8900900 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3 has 8037681 observations and 22 variables.
NOTE: DATA statement used (Total process time):
      real time           1.63 seconds
      cpu time            1.60 seconds
      

1387  
1388  
1389  * ************************************************
1390  *  make an indicator for large holding (>=1%);
1391  * ************************************************;
1392  * Please change the threshold to 2%, 3%, 5% to create robustness data;
1393  data MF_merged3_1;
1394      set MF_merged3;
1395      MFORpct = round(MFOR * 100, 0.01);
1396      if MFORpct >= 1 then LargeMF = 1;
1397      else LargeMF = 0;
1398  run;

NOTE: There were 8037681 observations read from the data set WORK.MF_MERGED3.
NOTE: The data set WORK.MF_MERGED3_1 has 8037681 observations and 24 variables.
NOTE: DATA statement used (Total process time):
      real time           1.27 seconds
      cpu time            1.14 seconds
      

1399  
1400  proc sql;
1401      create table MF_merged3_1 as
1402      select *, max(LargeMF) as LargeMF2 label = "Have LargeMF"
1403      from MF_merged3_1
1404      where shares_adj > 0
1405      group by permno, rdate
1406      having LargeMF2 = 1
1407      order by permno, rdate, mgmt_cd;
NOTE: The query requires remerging summary statistics back with the original data.
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.MF_MERGED3_1 created, with 7118887 rows and 25 columns.

1408  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           6.40 seconds
      cpu time            10.82 seconds
      

1409  
1410  
1411  /* ******************************************************************************** */
1412  /* Part 6:  Get identifers and date from Compustat  ******************************* */
1413  /* ******************************************************************************** */
1414  %let begdate = 01MAR1995;
1415  %let enddate = 31DEC2021;
1416  %let vars    = gvkey fyearq fqtr fyr rdq conm datadate indfmt datafmt popsrc consol saleq
1416! atq;
1417  
1418  data fundq;
1419      set comp.fundq_1950_2021 (keep = &vars);
1420      where datadate between "&begdate"d and "&enddate"d;
1421      if indfmt = 'INDL' and datafmt = 'STD' and popsrc = 'D' and consol = 'C';
1422      format endfyr begfyr date9.;
1423      endfyr = datadate;
1424      begfyr = intnx('month', endfyr, -11, 'beg');
1425      if atq   > 0;
1426      if saleq > 0;
1427  run;

NOTE: There were 1240531 observations read from the data set COMP.FUNDQ_1950_2021.
      WHERE (datadate>='01MAR1995'D and datadate<='31DEC2021'D);
NOTE: The data set WORK.FUNDQ has 861686 observations and 15 variables.
NOTE: DATA statement used (Total process time):
      real time           3.70 seconds
      cpu time            0.50 seconds
      

1428  proc sort; by gvkey endfyr; run;

NOTE: There were 861686 observations read from the data set WORK.FUNDQ.
NOTE: The data set WORK.FUNDQ has 861686 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.14 seconds
      cpu time            0.25 seconds
      

1429  
1430  * Make a link GVKEYS to CRSP-PERMNO;
1431  proc sql;
1432      create table comp_lnk as
1433      select *
1434      from fundq as a,
1435           lnk.ccmxpf_lnkhist as b
1436      where a.gvkey = b.gvkey
1437        and b.LINKTYPE in ("LU", "LC", "LD", "LN", "LS", "LX")
1438        and (b.LINKDT <= a.endfyr or b.LINKDT = .B)
1439        and (a.endfyr <= b.LINKENDDT or b.LINKENDDT = .E);
WARNING: Variable GVKEY already exists on file WORK.COMP_LNK.
NOTE: Table WORK.COMP_LNK created, with 624470 rows and 22 columns.

1440  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.15 seconds
      cpu time            0.12 seconds
      

1441  
1442  
1443  /* ******************************************************************************** */
1444  /* Part 7: Make the InformedTradeGrap variable  *********************************** */
1445  /* ******************************************************************************** */
1446  proc sql;
1447      create view MF_merged_comp1 as
1448      select a.gvkey,
1449             a.datadate,
1450             a.rdq,
1451             b.*
1452      from comp_lnk as a
1453      join MF_merged3_1 as b
1454        on a.lpermno = b.permno
1455       and year(a.datadate) = year(b.rdate)
1456       and qtr(a.datadate)  = qtr(b.rdate);
NOTE: SQL view WORK.MF_MERGED_COMP1 has been defined.
1457  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

1458  
1459  proc sort data = MF_merged_comp1
1460            out  = MF_merged_comp
1461            nodupkey;
1462      by permno rdate mgmt_cd;
1463  run;

NOTE: There were 7170336 observations read from the data set WORK.MF_MERGED_COMP1.
NOTE: 128013 observations with duplicate key values were deleted.
NOTE: The data set WORK.MF_MERGED_COMP has 7042323 observations and 28 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           4.55 seconds
      cpu time            5.96 seconds
      

1464  
1465  * read the abnormal return data;
1466  data abret_car;
1467      set rawdata.abret013024_capm;
1468  run;

NOTE: There were 816855 observations read from the data set RAWDATA.ABRET013024_CAPM.
NOTE: The data set WORK.ABRET_CAR has 816855 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           0.20 seconds
      cpu time            0.03 seconds
      

1469  
1470  proc sort data = abret_car nodupkey;
1471      by gvkey rdq;
1472  run;

NOTE: There were 816855 observations read from the data set WORK.ABRET_CAR.
NOTE: 9675 observations with duplicate key values were deleted.
NOTE: The data set WORK.ABRET_CAR has 807180 observations and 9 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.08 seconds
      cpu time            0.21 seconds
      

1473  
1474  /* lead abnormal returns by 1 quarter */
1475  proc expand data = abret_car
1476              out  = abret_car
1477              method = none;
1478      by gvkey;
1479      id rdq;
1480      convert abret = abret_lead / transformout = (lead 1);
1481      convert car   = car_lead   / transformout = (lead 1);
1482  run;

NOTE: The data set WORK.ABRET_CAR has 807180 observations and 11 variables.
NOTE: PROCEDURE EXPAND used (Total process time):
      real time           0.85 seconds
      cpu time            0.86 seconds
      

1483  
1484  data abret_car;
1485      set abret_car;
1486      label abret_lead = "Abret t+1";
1487      label car_lead   = "CAR[-1,1] t+1";
1488  run;

NOTE: There were 807180 observations read from the data set WORK.ABRET_CAR.
NOTE: The data set WORK.ABRET_CAR has 807180 observations and 11 variables.
NOTE: DATA statement used (Total process time):
      real time           0.05 seconds
      cpu time            0.06 seconds
      

1489  
1490  * merge Abnormal returns to MFF data;
1491  proc sql;
1492      create table MF_merged_comp as
1493      select a.*, b.car, b.abret, b.car_lead, b.abret_lead, b.logret, b.fyear
1494      from MF_merged_comp as a
1495      join abret_car as b
1496        on a.gvkey = b.gvkey
1497       and a.rdq   = b.rdq;
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.MF_MERGED_COMP created, with 6934109 rows and 34 columns.

1498  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           2.69 seconds
      cpu time            2.62 seconds
      

1499  
1500  data MF_merged_comp;
1501      set MF_merged_comp;
1502      format car abret car_lead abret_lead comma8.5;
1503      stkpick1 = (changeMFOR * 100)    * (car_lead * 100);
1504      stkpick2 = (changefweight * 100) * (car_lead * 100);
1505      if stkpick1 ne .;
1506  run;

NOTE: Missing values were generated as a result of performing an operation on missing values.
      Each place is given by: (Number of times) at (Line):(Column).
      65236 at 1503:50   751 at 1504:31     65218 at 1504:50   
NOTE: There were 6934109 observations read from the data set WORK.MF_MERGED_COMP.
NOTE: The data set WORK.MF_MERGED_COMP has 6868873 observations and 36 variables.
NOTE: DATA statement used (Total process time):
      real time           1.53 seconds
      cpu time            1.48 seconds
      

1507  
1508  proc sql;
1509      create table MF_merged_comp2 as
1510      select *,
1511             avg(stkpick1) as avg_stkpick1_all,
1512             avg(stkpick2) as avg_stkpick2_all
1513      from MF_merged_comp
1514      group by permno, rdate
1515      order by permno, rdate, LargeMF;
NOTE: The query requires remerging summary statistics back with the original data.
NOTE: Table WORK.MF_MERGED_COMP2 created, with 6868873 rows and 38 columns.

1516  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           6.95 seconds
      cpu time            11.32 seconds
      

1517  
1518  proc sql;
1519      create table MF_merged_comp2_1 as
1520      select gvkey, datadate, rdq, car_lead, car, permno, rdate, md, qd,
1521             LargeMF, mgmt_cd, MFOR, stkpick1, stkpick2, avg_stkpick1_all, avg_stkpick2_all
1522      from MF_merged_comp2;
NOTE: Table WORK.MF_MERGED_COMP2_1 created, with 6868873 rows and 16 columns.

1523  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.84 seconds
      cpu time            0.84 seconds
      

1524  
1525  proc sql;
1526      create table MF_merged_comp2_2 as
1527      select *,
1528             avg(stkpick1) as avg_stkpick1,
1529             avg(stkpick2) as avg_stkpick2,
1530             count(mgmt_cd) as NumInst,
1531             avg(MFOR)      as avgMFOR,
1532             sum(MFOR)      as sumMFOR
1533      from MF_merged_comp2_1
1534      group by permno, rdate, LargeMF
1535      order by permno, rdate, LargeMF;
NOTE: The query requires remerging summary statistics back with the original data.
NOTE: Table WORK.MF_MERGED_COMP2_2 created, with 6868873 rows and 21 columns.

1536  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           2.02 seconds
      cpu time            1.95 seconds
      

1537  
1538  data MF_merged_comp2_2;
1539      set MF_merged_comp2_2;
1540      if LargeMF = 1 then _stkpick1_Large = avg_stkpick1;
1541      if LargeMF = 0 then _stkpick1_Small = avg_stkpick1;
1542  run;

NOTE: There were 6868873 observations read from the data set WORK.MF_MERGED_COMP2_2.
NOTE: The data set WORK.MF_MERGED_COMP2_2 has 6868873 observations and 23 variables.
NOTE: DATA statement used (Total process time):
      real time           0.77 seconds
      cpu time            0.76 seconds
      

1543  
1544  proc sql;
1545      create table MF_merged_comp2_3 as
1546      select *,
1547             max(_stkpick1_Large) as stkpick1_Large,
1548             max(_stkpick1_Small) as stkpick1_Small
1549      from MF_merged_comp2_2
1550      group by permno, rdate
1551      order by permno, rdate, LargeMF;
NOTE: The query requires remerging summary statistics back with the original data.
NOTE: Table WORK.MF_MERGED_COMP2_3 created, with 6868873 rows and 25 columns.

1552  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           3.90 seconds
      cpu time            7.12 seconds
      

1553  
1554  data MF_merged_comp2_3;
1555      set MF_merged_comp2_3;
1556      drop _stkpick1_Large _stkpick1_Small;
1557      year = year(rdate);
1558  run;

NOTE: There were 6868873 observations read from the data set WORK.MF_MERGED_COMP2_3.
NOTE: The data set WORK.MF_MERGED_COMP2_3 has 6868873 observations and 24 variables.
NOTE: DATA statement used (Total process time):
      real time           0.91 seconds
      cpu time            0.89 seconds
      

1559  
1560  * treat outliers;
1561  %let winsVars = avg_stkpick1 avg_stkpick2 avg_stkpick1_all stkpick1_Large stkpick1_Small;
1562  %winsor(
1563      dsetin  = work.MF_merged_comp2_3,
1564      dsetout = work.MF_merged_comp2_3,
1565      byvar   = year,
1566      vars    = &winsVars,
1567      type    = winsor,
1568      pctl    = 1 99
1569  );

NOTE: There were 6868873 observations read from the data set WORK.MF_MERGED_COMP2_3.
NOTE: The data set WORK.XTEMP has 6868873 observations and 24 variables.
NOTE: DATA statement used (Total process time):
      real time           0.70 seconds
      cpu time            0.70 seconds
      


NOTE: There were 6868873 observations read from the data set WORK.XTEMP.
NOTE: The data set WORK.XTEMP has 6868873 observations and 24 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           1.60 seconds
      cpu time            3.28 seconds
      


NOTE: The data set WORK.XTEMP_PCTL has 25 observations and 11 variables.
NOTE: PROCEDURE UNIVARIATE used (Total process time):
      real time           8.41 seconds
      cpu time            8.34 seconds
      


WARNING: The variable xbyvar in the DROP, KEEP, or RENAME list has never been referenced.
NOTE: There were 6868873 observations read from the data set WORK.XTEMP.
NOTE: There were 25 observations read from the data set WORK.XTEMP_PCTL.
NOTE: The data set WORK.MF_MERGED_COMP2_3 has 6868873 observations and 24 variables.
NOTE: DATA statement used (Total process time):
      real time           1.23 seconds
      cpu time            1.21 seconds
      

1570  proc sql;
1571      drop table xtemp, xtemp_pctl;
NOTE: Table WORK.XTEMP has been dropped.
NOTE: Table WORK.XTEMP_PCTL has been dropped.
1572  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.08 seconds
      cpu time            0.07 seconds
      

1573  
1574  * we compute the difference between Large and small;
1575  proc sort data = MF_merged_comp2_3 nodupkey;
1576      by permno rdate LargeMF;
1577  run;

NOTE: There were 6868873 observations read from the data set WORK.MF_MERGED_COMP2_3.
NOTE: 6372251 observations with duplicate key values were deleted.
NOTE: The data set WORK.MF_MERGED_COMP2_3 has 496622 observations and 24 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.77 seconds
      cpu time            1.53 seconds
      

1578  
1579  data MF_merged_comp2_3;
1580      set MF_merged_comp2_3;
1581      by permno rdate;
1582      Relstkpick1 = dif(avg_stkpick1);
1583      if first.permno or first.rdate then Relstkpick1 = .;
1584  run;

NOTE: There were 496622 observations read from the data set WORK.MF_MERGED_COMP2_3.
NOTE: The data set WORK.MF_MERGED_COMP2_3 has 496622 observations and 25 variables.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      cpu time            0.07 seconds
      

1585  
1586  proc sort data = MF_merged_comp2_3 nodupkey;
1587      by permno rdate LargeMF;
1588  run;

NOTE: There were 496622 observations read from the data set WORK.MF_MERGED_COMP2_3.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.MF_MERGED_COMP2_3 has 496622 observations and 25 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.10 seconds
      cpu time            0.20 seconds
      

1589  
1590  data MF_merged_comp2_4;
1591      set MF_merged_comp2_3;
1592      by permno rdate;
1593      Relstkpick2 = dif(avg_stkpick2);
1594      if first.permno or first.rdate then Relstkpick2 = .;
1595  run;

NOTE: There were 496622 observations read from the data set WORK.MF_MERGED_COMP2_3.
NOTE: The data set WORK.MF_MERGED_COMP2_4 has 496622 observations and 26 variables.
NOTE: DATA statement used (Total process time):
      real time           0.06 seconds
      cpu time            0.06 seconds
      

1596  
1597  proc sort data = MF_merged_comp2_4 nodupkey;
1598      by permno rdate LargeMF;
1599  run;

NOTE: There were 496622 observations read from the data set WORK.MF_MERGED_COMP2_4.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.MF_MERGED_COMP2_4 has 496622 observations and 26 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.10 seconds
      cpu time            0.18 seconds
      

1600  data MF_merged_comp2_4;
1601      set MF_merged_comp2_4;
1602      if LargeMF = 0 then _avgMFORsmall = avgMFOR;
1603      else _avgMFORsmall = 0;
1604      if LargeMF = 1 then _avgMFORlarge = avgMFOR;
1605      else _avgMFORlarge = 0;
1606      if LargeMF = 0 then _sumMFORsmall = sumMFOR;
1607      else _sumMFORsmall = 0;
1608      if LargeMF = 1 then _sumMFORlarge = sumMFOR;
1609      else _sumMFORlarge = 0;
1610      if LargeMF = 0 then _NumInstsmall = NumInst;
1611      else _NumInstsmall = 0;
1612      if LargeMF = 1 then _NumInstlarge = NumInst;
1613      else _NumInstlarge = 0;
1614  run;

NOTE: There were 496622 observations read from the data set WORK.MF_MERGED_COMP2_4.
NOTE: The data set WORK.MF_MERGED_COMP2_4 has 496622 observations and 32 variables.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      cpu time            0.07 seconds
      

1615  
1616  /* collapse data to the firm-quarter */
1617  proc sql;
1618      create table MF_merged_comp2_4 as
1619      select *,
1620             max(_avgMFORsmall) as avgMFORsmall label = "Avg of MFFOwn (small)",
1621             max(_avgMFORlarge) as avgMFORlarge label = "Avg of MFFOwn (large)",
1622             max(_sumMFORsmall) as sumMFORsmall label = "Sum of MFFOwn (small)",
1623             max(_sumMFORlarge) as sumMFORlarge label = "Sum of MFFOwn (large)",
1624             max(_NumInstsmall) as NumInstsmall label = "Number of MFF (small)",
1625             max(_NumInstlarge) as NumInstlarge label = "Number of MFF (large)"
1626      from MF_merged_comp2_4
1627      group by permno, rdate;
NOTE: The query requires remerging summary statistics back with the original data.
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of 
         this is a possible data integrity problem.
NOTE: Table WORK.MF_MERGED_COMP2_4 created, with 496622 rows and 38 columns.

1628  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.33 seconds
      cpu time            0.42 seconds
      

1629  
1630  data MF_merged_comp3;
1631      set MF_merged_comp2_4;
1632      drop avg_stkpick1 avg_stkpick2 LargeMF;
1633      if Relstkpick2 eq . then delete;
1634      ryear = year(rdate);
1635      format avgMFORsmall avgMFORlarge sumMFORsmall sumMFORlarge percent8.2;
1636      drop _avgMFORsmall _avgMFORlarge _sumMFORsmall _sumMFORlarge
1637           _NumInstsmall _NumInstlarge NumInst mgmt_cd avgMFOR sumMFOR;
1638  run;

NOTE: There were 496622 observations read from the data set WORK.MF_MERGED_COMP2_4.
NOTE: The data set WORK.MF_MERGED_COMP3 has 240430 observations and 26 variables.
NOTE: DATA statement used (Total process time):
      real time           0.05 seconds
      cpu time            0.06 seconds
      

1639  
1640  proc sort data = MF_merged_comp3;
1641      by permno qd md;
1642  run;

NOTE: There were 240430 observations read from the data set WORK.MF_MERGED_COMP3.
NOTE: The data set WORK.MF_MERGED_COMP3 has 240430 observations and 26 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.06 seconds
      cpu time            0.09 seconds
      

1643  
1644  data MF_merged_comp4;
1645      retain gvkey datadate rdq permno rdate ryear;
1646      set MF_merged_comp3;
1647      by permno qd md;
1648      if last.qd;
1649  run;

NOTE: There were 240430 observations read from the data set WORK.MF_MERGED_COMP3.
NOTE: The data set WORK.MF_MERGED_COMP4 has 240430 observations and 26 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
      

1650  
1651  data MF_merged_comp4;
1652      set MF_merged_comp4;
1653      label avg_stkpick1_all = "InformedTrade All"
1654            stkpick1_Large   = "InformedTrade LH"
1655            stkpick1_Small   = "InformedTrade SH"
1656            Relstkpick1      = "InformedTradeGrap"
1657            Relstkpick2      = "InformedTradeGrap2";
1658  run;

NOTE: There were 240430 observations read from the data set WORK.MF_MERGED_COMP4.
NOTE: The data set WORK.MF_MERGED_COMP4 has 240430 observations and 26 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
      

1659  
1660  /* delete unneeded datasets */
1661  proc datasets nowarn nolist nodetails;
1662      delete MF_merged_comp
1663             MF_merged_comp1
1664             MF_merged_comp2
1665             MF_merged_comp3
1666             abret_car
1667             MFO_Metrics_comp
1668             MFO_TimeSeries_comp
1669             MFO_Metrics3
1670             MFO_TimeSeries3;
1671  run;

NOTE: Deleting WORK.MF_MERGED_COMP (memtype=DATA).
NOTE: Deleting WORK.MF_MERGED_COMP2 (memtype=DATA).
NOTE: Deleting WORK.MF_MERGED_COMP3 (memtype=DATA).
NOTE: Deleting WORK.ABRET_CAR (memtype=DATA).
1672  quit;

NOTE: PROCEDURE DATASETS used (Total process time):
      real time           0.33 seconds
      cpu time            0.34 seconds
      

1673  
1674  data save.stkpick111624_mff_1;
1675      set MF_merged_comp4;
1676  run;

NOTE: There were 240430 observations read from the data set WORK.MF_MERGED_COMP4.
NOTE: The data set SAVE.STKPICK111624_MFF_1 has 240430 observations and 26 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds
      

1677  
1678  proc printto;
1679  run;

